﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace jTest
{
    public static class ConsoleLogger
    {
        public static void LogError(object message)
        {
            ConsoleColor defaultColor = Console.ForegroundColor;
            try
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("********************* Error ********************************");
                Console.WriteLine("    Error: ");
                Console.WriteLine(message.ToString());
                Console.WriteLine("********************* Error ********************************");
            }
            catch (Exception ex)
            {
                Console.WriteLine("****    Wow you throw a error while trying to log    ***");
                Console.WriteLine("    Error: ");
                Console.WriteLine(ex.ToString());
                Console.WriteLine("****    End Wow you throw a error while trying to log    ***");
            }
            finally
            {
                Console.ForegroundColor = defaultColor;
            }
        }        
    }
}
